<%@ page language="java" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
<%@ taglib uri="/tags/faare" prefix="fa" %>

<HTML>
    <HEAD>
        <TITLE>Application menu and body</TITLE>
        <LINK rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/standard.css" />
    </HEAD>
    <BODY style="margin: 0; overflow: auto;" class="body_background">
        <!-- #### Horizontal Menu #### -->
        <TABLE cellpadding="0" cellspacing="0" border="0" width="100%" summary="Menu and body" class="body">
           <TR class="background">
              <TD><IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="1" height="45" border="0" alt=""></TD>
              <TD width="100%">
                 <TABLE cellpadding="0" cellspacing="0" width="100%" border="0" summary="Top menu icons">
                    <TR>
                       <fa:getMenu id="Hmenu" name="horizontal_menu_edition" />
                       <logic:iterate id="elt" name="Hmenu" property="elements">
                          <TD><IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="24" height="1" alt="" border="0"></TD>
                          <TD align="center">
                             <fa:showMenuElement name="elt" style="" basecontext="page"  />
                          </TD>
                       </logic:iterate>
                    </TR>
                 </TABLE>
              </TD>
              <TD align="center">
                 <html:link action="/showPerson" paramId="dn" paramName="user" paramProperty="dn" target="_self">
                    <NOBR>&nbsp;&nbsp;&nbsp;<bean:write name="user" property="commonName" />&nbsp;&nbsp;&nbsp;</NOBR>
                 </html:link>
                 <IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="1" height="8" border="0" alt=""><BR/>
                 <logic:empty name="user" property="profile">
                    <NOBR>&nbsp;&nbsp;&nbsp;Standard profile&nbsp;&nbsp;&nbsp;</NOBR>
                 </logic:empty>
                 <logic:notEmpty name="user" property="profile">
                    <html:link action="/showProfile" paramId="dn" paramName="user" paramProperty="dn" target="_parent">
                       <NOBR>&nbsp;&nbsp;&nbsp;<bean:write name="user" property="profile" />&nbsp;&nbsp;&nbsp;</NOBR>
                    </html:link>
                 </logic:notEmpty>
              </TD>
           </TR>
           <TR style="background-image: url('<%=request.getContextPath()%>/images/top_background_01.gif');">
              <TD><IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="1" height="20" border="0" alt=""></TD>
              <TD width="100%" valign="middle"></TD>
              <TD width="100%" valign="middle"></TD>
           </TR>
        </TABLE>

        <!-- #### Body #### -->
        <TABLE cellpadding="0" cellspacing="20" border="0" align="center" width="100%" summary="Body" class="body">
            <TR><TD valign="top" height="450" width="100%" align="center">
                    <TABLE cellpadding="0" cellspacing="0" border="0" summary="Body" class="body" align="center" width="100%" >
                        <TR><TD width="80%">
                                <TABLE cellpadding="0" cellspacing="0" border="0" summary="bottom" align="center">
                                    <TR><TD><IMG src="<%=request.getContextPath()%>/images/top_left_selected.gif" width="6" height="6" alt=""></TD>
                                        <TD class="background" width="100%"><IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="100" height="1" alt=""></TD>
                                        <TD><IMG src="<%=request.getContextPath()%>/images/top_right_selected.gif" width="6" height="6" alt=""></TD>
                                    </TR>
                                </TABLE>
                            </TD>
                            <TD valign="top" width="200" rowspan="3">&nbsp;<IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="50" height="5" alt="" border="0"></TD>
                        </TR>
                        <TR><TD class="background">
                                <DIV style="margin: 15;">
								    <html:form action="/modifyPersonServiceManager" method="POST" target="_self">
                                    <TABLE cellpadding="0" cellspacing="5" border="0" summary="Body" class="body">
                                        <TR>
										     <TD>
											 <TABLE cellpadding="0" cellspacing="5" border="0" summary="Body" class="body">
											 <TR>
                                                <TD width="60" rowspan="2">
                                                  <img src="ImageDispatcher?dn=<bean:write name='personForm' property='user.dn'/>&attname=photo" border="1" height="75">
												</TD>
												<TD class="name" valign="top">
												<NOBR>&nbsp;<bean:write name="personForm" property="user.commonName" />&nbsp;</NOBR>
												</TD>
											 </TR>
			                                 <TR>
                                                <TD class="job_title">
											   <NOBR>&nbsp;<bean:write name="personForm" property="user.title" />&nbsp;-&nbsp;<bean:write name="personForm" property="user.department" />&nbsp;</NOBR>
	    										</TD>
                                             </TR>
											 </TABLE>
											 </TD>
                                        </TR>
                                        <TR><TD><IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="1" height="5" alt=""></TD>
										</TR>
<!-- TODO appAuth -->                   <TR>
										   <TD class="body">Application authorization&nbsp;:&nbsp;
   										   <html:select name="personForm" property="user.appAuth">
											    <html:options labelName="personForm" labelProperty="appAuthList" name="personForm" property="appAuthValueList" />
										   </html:select>
										   </TD>
										</TR>
										<TR><TD>
										<IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="24" height="5" alt="" border="0">
										</TD></TR>
										<TR>
										   <TD align="center">
										      <INPUT type="image" src="<%=request.getContextPath()%>/images/ok_button.gif" border="0" alt="Submit" title="Submit">
										   </TD>
        								</TR>
									</TABLE>
									</html:form>
                                </DIV>
                            </TD>
                        </TR>
                        <TR><TD width="80%">
                                <TABLE cellpadding="0" cellspacing="0" border="0" summary="bottom" align="center">
                                    <TR><TD><IMG src="<%=request.getContextPath()%>/images/bottom_left_selected.gif" width="6" height="6" alt=""></TD>
                                        <TD class="background" width="100%"><IMG src="<%=request.getContextPath()%>/images/spacer.gif" width="100" height="1" alt=""></TD>
                                        <TD><IMG src="<%=request.getContextPath()%>/images/bottom_right_selected.gif" width="6" height="6" alt=""></TD>
                                    </TR>
                                </TABLE>
                            </TD>
                        </TR>
                    </TABLE>
                </TD>
            </TR>
        </TABLE>
    </BODY>
</HTML>
